inherited frmSaleIntegralBill: TfrmSaleIntegralBill
  Left = 457
  Top = 156
  Caption = #31215#20998#20817#25442#21333
  PixelsPerInch = 96
  TextHeight = 12
  inherited pnlDBCtrl: TPanel
    inherited pnlThirdtrade: TPanel
      inherited lblTTtraderid: TcxLabel
        AnchorX = 78
      end
      inherited cxLabel1: TcxLabel
        Left = 216
        ExplicitLeft = 216
        AnchorX = 244
      end
      inherited lblTTBalanceid: TcxLabel
        Left = 381
        ExplicitLeft = 381
        AnchorX = 433
      end
    end
    inherited lblName: TcxLabel
      Style.IsFontAssigned = True
    end
    inherited DtlPageCtrl: TcxPageControl
      inherited tsSum: TcxTabSheet
        ExplicitWidth = 872
        ExplicitHeight = 200
      end
    end
    inherited imgAbate: TcxImage
      Left = 227
      ExplicitLeft = 227
    end
    inherited lblPrinted: TcxLabel
      Style.IsFontAssigned = True
    end
    inherited dynlblCreate_by: TcxLabel
      AnchorX = 221
    end
    inherited dynlblCheck_by: TcxLabel
      AnchorX = 429
    end
    inherited dynlblFilid: TcxLabel
      AnchorX = 88
    end
    inherited dynlblDeptid: TcxLabel
      AnchorX = 301
    end
    inherited dynlblEmpid: TcxLabel
      AnchorX = 505
    end
    inherited dynlblBKind: TcxLabel
      AnchorX = 149
    end
  end
  inherited Panel1: TPanel
    inherited labFuncName: TcxLabel
      Style.IsFontAssigned = True
    end
    inherited labFuncDesc: TcxLabel
      Style.IsFontAssigned = True
    end
  end
  inherited pnlBottom: TPanel
    inherited lblDepotQty: TcxLabel
      Style.IsFontAssigned = True
    end
    inherited btnCancle: TcxButton
      TabOrder = 2
    end
    inherited btnOk: TcxButton
      TabOrder = 1
    end
    inherited btnNew: TcxButton
      TabOrder = 3
    end
  end
  inherited cxStyleRepository1: TcxStyleRepository
    PixelsPerInch = 96
    inherited cxGridBandedTableViewStyleSheet1: TcxGridBandedTableViewStyleSheet
      BuiltIn = True
    end
  end
  inherited cdsMaster: TClientDataSet
    Top = 192
  end
  inherited qryDetail: TUniQuery
    SQL.Strings = (
      
        'select d.*,cast(dbo.f_getallqty(d.productid,unit1qty,unit2qty,un' +
        'it3qty) as varchar(30)) as Allqty  '
      
        ',dbo.f_getrelationbcode(d.relationbtype,d.relationbid) as relati' +
        'onbcode '
      
        ',round((d.price*(1+d.taxrate/100)/(d.disc/100))*(1-d.disc/100)*d' +
        '.quantity,2) as discamt '
      ',p.code p_code, p.name p_name, p.spec p_spec, p.abname p_abname '
      
        ',p.custom1 p_custom1, p.custom2 p_custom2, p.custom3 p_custom3, ' +
        'p.custom4 p_custom4, p.custom5 p_custom5  '
      
        ',p.custom6 p_custom6, p.custom7 p_custom7, p.custom8 p_custom8, ' +
        'p.custom9 p_custom9, p.custom10 p_custom10  '
      
        ',dt.code depotcode, dt.name depotname  ,u.barcode unitbarcode, u' +
        '.unitname, u.rate unitrate, t.unitname as baseunitname'
      ',l.unitname as unitassname  from tb_saledtl d '
      'left join td_product p on d.productid=p.p_id '
      'left join td_depot dt on d.depotid=dt.depotid '
      'left join td_unitprice u on d.unitid=u.unitid '
      
        'left join td_unitprice t on (d.productid=t.productid and t.baseu' +
        'nit=1)    '
      
        'left join td_unitprice l on (d.productid=l.productid and l.u_no=' +
        '0)        '
      'where bid=4 order by d.borderno')
  end
  object dsHistory: TDataSource [34]
    DataSet = qryHistory
    Left = 392
    Top = 373
  end
  object qryHistory: TUniQuery [35]
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select * from v_tb_sale')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Left = 340
    Top = 373
  end
  inherited MainDataSet: TUniQuery
    Left = 28
    Top = 189
  end
end
